import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/home'
import find from '../views/find'
import order from '../views/order'
import mine from '../views/mine'
import menoy from '../views/find/menoy'
import exchange from '../views/mine/exchange'
import goodinfo from '../views/home/goodinfo'
import goodlist from '../views/home/goodlist'
import address from '../views/home/search/address'
import search from '../views/home/search/search'
import privacy from '../views/mine/privacy'
import download from '../views/mine/download'
import admin from '../views/mine/admin'
import login from '../views/mine/login'
import cservice from '../views/mine/cservice'
import rule from '../views/mine/rule'
import business from '../views/mine/rule/business'
import promise from '../views/mine/rule/promise'
import myaddress from "../views/mine/myaddress"
import editaddress from "../views/mine/editaddress"
import pay from '../views/home/pay'
import checkaddress from "../views/mine/checkaddress"
import caddaddress from "../views/mine/caddaddress"
import order2 from "../views/order2"
import confirm from '../views/home/confirm'
import editaddress2 from "../views/mine/editaddress2"
Vue.use(VueRouter)



const routes = [{
        path: '/',
        redirect: "/home"
    },
    {
        path: '/home',
        component: home
    },
    {
        path: '/home/pay/:id',
        component: pay
    },
    {
        path: '/home/goodinfo/:id',
        component: goodinfo
    },
    {
        path: '/home/goodlist/:id',
        component: goodlist
    },
    {
        path: '/home/address',
        component: address
    },
    {
        path: '/home/search',
        component: search
    },
    {
        path: '/find',
        component: find
    },
    {
        path: '/find/menoy',
        component: menoy
    },
    {
        path: '/order',
        component: order
    },
    {
        path: '/mine',
        component: mine
    },
    {
        path: '/mine/exchange',
        component: exchange
    },
    {
        path: '/mine/privacy',
        component: privacy
    },
    {
        path: '/mine/download',
        component: download
    },
    {
        path: '/mine/admin',
        component: admin
    },
    {
        path: '/mine/login',
        component: login
    },
    {
        path: '/mine/cservice',
        component: cservice
    },
    {
        path: '/mine/rule',
        component: rule
    },
    {
        path: '/mine/rule/business',
        component: business
    },
    {
        path: '/mine/rule/promise',
        component: promise
    },
    {
        path: '/mine/editaddress/:id',
        component: editaddress
    },
    {
        path: '/mine/myaddress',
        component: myaddress
    },
    {
        path: '/find/menoy',
        component: menoy
    },
    {
        path: '/mine/exchange',
        component: exchange
    },
    {
        path: '/home/confirm/:id',
        component: confirm
    }, {
        path: '/mine/checkaddress/:id',
        component: checkaddress
    },
    {
        path: '/mine/caddaddress/:id',
        component: caddaddress
    },
    {
        path: '/order2',
        component: order2
    },
    {
        path: '/mine/editaddress2/:id',
        component: editaddress2
    }
]


// {
//   path: '/',
//   name: 'home',
//   component: Home
// },
// {
//   path: '/about',
//   name: 'about',
//   // route level code-splitting
//   // this generates a separate chunk (about.[hash].js) for this route
//   // which is lazy-loaded when the route is visited.
//   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
// }


// {
//   path: '/',
//   name: 'home',
//   component: Home
// },
// {
//   path: '/about',
//   name: 'about',
//   // route level code-splitting
//   // this generates a separate chunk (about.[hash].js) for this route
//   // which is lazy-loaded when the route is visited.
//   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
// }
const router = new VueRouter({
    routes
})

export default router